package java8_31.printer;

/**
 * @author oldliu
 * @since 1.0
 */
public class Printer {
    private String brand;
    private int price;
    private InkBox box;//墨盒接口
    private Paper paper;//纸张接口

    //打印内容
    public void print(String words){
        System.out.println("用"+box.getColor()+"来打印:");
        paper.print(words);
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }
    //!!!!
    public void setBox(InkBox box) {
        this.box = box;
    }
    //!!!!
    public void setPaper(Paper paper) {
        this.paper = paper;
    }
}
